import { S } from '../../s';
import { IPSDEDRBar } from './ipsdedrbar';
import { IPSDEDRBarGroup } from './ipsdedrbar-group';
import { IPSDEDRBarItem } from './ipsdedrbar-item';
import { PSDEDRCtrlItemImpl } from './psdedrctrl-item-impl';

export class PSDEDRBarItemImpl
  extends PSDEDRCtrlItemImpl
  implements IPSDEDRBarItem
{
  protected psdedrbargroup: IPSDEDRBarGroup;
  getPSDEDRBarGroup(): IPSDEDRBarGroup | null {
    if (this.psdedrbargroup != null) return this.psdedrbargroup;
    const value = this.M.getPSDEDRBarGroup;
    if (value == null) {
      return;
    }
    const ipsdedrbar = this.getParentPSModelObject(S._21e) as IPSDEDRBar;
    if (ipsdedrbar != null) {
      this.psdedrbargroup = ipsdedrbar.findPSDEDRBarGroup(value);
    }
    return this.psdedrbargroup;
  }
  get cls(): string {
    return 'PSDEDRBarItemImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._a1) return true;
    return super.instanceof(cls);
  }
}
